<?php

if ( !defined('AREA') ) { die('Access denied'); }


// Filesystem paths
define('DIR_CORE', DIR_ROOT . '/core/');
define('DIR_LIB', DIR_ROOT . '/lib/');
define('DIR_MODULE', DIR_ROOT . '/module/');
define('DIR_ADDONS', DIR_ROOT . '/addons/');
define('DIR_SKINS',  DIR_ROOT . '/template/');
define('DIR_IMAGES', DIR_ROOT . '/images/');
define('DIR_TMP', DIR_ROOT . '/tmp/');
define('DIR_CSS', DIR_ROOT . '/css/');
define('DIR_JS', DIR_ROOT . '/js/');
define('DIR_THUMBNAILS', DIR_IMAGES . 'thumbnails/');
define('__PS__', PATH_SEPARATOR);

// var dirs
define('DIR_COMPILED', DIR_ROOT . '/var/compiled/');
define('DIR_DATABASE', DIR_ROOT . '/var/database/');
define('DIR_DOWNLOADS', DIR_ROOT . '/var/downloads/');
define('DIR_UPGRADE', DIR_ROOT . '/var/upgrade/');
define('DIR_CACHE', DIR_ROOT . '/var/cache/');

//dashboard
define('DIR_DASHBOARD_SKINS',  DIR_ROOT . '/dashboard/template/');
define('DIR_DASHBOARD_COMPILED', DIR_ROOT . '/var/compiled/dashboard/');
// Week days
define('SUNDAY',    0);
define('MONDAY',    1);
define('TUESDAY',   2);
define('WEDNESDAY', 3);
define('THURSDAY',  4);
define('FRIDAY',    5);
define('SATURDAY',  6);


// statuses definitions
define('STATUSES_ORDER', 'O');

// SEF urls delimiter
define('SEO_DELIMITER', '-');

// Nubmer of seconds in one hour
define('SECONDS_IN_HOUR', 60 * 60); // one hour

// Nubmer of seconds in one day
define('SECONDS_IN_DAY', SECONDS_IN_HOUR * 24); // one day

// Live time for permanent cookies (currency, language, etc...)
define('COOKIE_ALIVE_TIME', SECONDS_IN_DAY * 7); // one week

// Session live time
define('SESSION_ALIVE_TIME', SECONDS_IN_HOUR * 2); // 2 hours

// Sessions storage live time
define('SESSIONS_STORAGE_ALIVE_TIME',  SECONDS_IN_DAY * 7 * 2); // 2 weeks


// Database tables prefix
define('TABLE_PREFIX', 'rotery_');


// Controller return statuses
define('CONTROLLER_STATUS_REDIRECT', 302);
define('CONTROLLER_STATUS_OK', 200);
define('CONTROLLER_STATUS_NO_PAGE', 404);
define('CONTROLLER_STATUS_DENIED', 403);
define('CONTROLLER_STATUS_DEMO', 401);




// Default permissions for newly created files and directories
define('DEFAULT_FILE_PERMISSIONS', 0666);
define('DEFAULT_DIR_PERMISSIONS', 0777);

/*
 * Dymanic options
 */
$config = array();

// List of allow file extensions (for uploaded files)
$config['allow_file_extensions'] = array (
	'gif',
	'jpg',
	'png',
	'swf'
);

@ini_set('log_errors','On'); // enable or disable php error logging (use 'On' or 'Off')
@ini_set('display_errors','Off'); // enable or disable public display of errors (use 'On' or 'Off')
@ini_set('error_log',DIR_ROOT . '/php-errors.log'); // path to server-writable log file

// Get local configuration
require(DIR_ROOT . '/config.local.php');

?>